home *** CD-ROM | disk | FTP | other *** search
/ Best of www.BestZips.com (Collector's Edition) / Best of WWW.BESTZIPS.COM Collector's Edition (JCSM Shareware) (JCS Marketing).ISO / prgtools / prtsut53.zip / SU1SRC.ZIP / REPDEM04.PAS < prev    next >
Pascal/Delphi Source File  |  1996-08-13  |  2KB  |  64 lines

  1. unit Repdem04;
  2.  
  3. interface
  4.  
  5. uses
  6.   SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
  7.   Forms, Dialogs, DBTables, DB, Grids, DBGrids, StdCtrls, Buttons, ExtCtrls,
  8.   PrnGridR, Printers, CB_Types, CB_MFunc;
  9.  
  10. type
  11.   Tdem04form = class(TForm)
  12.     Panel1: TPanel;
  13.     Label1: TLabel;
  14.     Label2: TLabel;
  15.     Label3: TLabel;
  16.     Preview: TBitBtn;
  17.     Exit: TBitBtn;
  18.     Panel2: TPanel;
  19.     Query1: TQuery;
  20.     Query1PartNo: TFloatField;
  21.     Query1VendorNo: TFloatField;
  22.     Query1Description: TStringField;
  23.     Query1OnHand: TFloatField;
  24.     Query1OnOrder: TFloatField;
  25.     Query1Cost: TCurrencyField;
  26.     Query1ListPrice: TCurrencyField;
  27.     DataSource1: TDataSource;
  28.     DBGrid1: TDBGrid;
  29.     PrintGridReport1: TPrintGridReport;
  30.     procedure PreviewClick(Sender: TObject);
  31.     procedure PrintGridReport1PrintFooter(Sender: TObject);
  32.   private
  33.     { Private declarations }
  34.   public
  35.     { Public declarations }
  36.   end;
  37.  
  38. var
  39.   dem04form: Tdem04form;
  40.  
  41. implementation
  42.  
  43. {$R *.DFM}
  44.  
  45. procedure Tdem04form.PreviewClick(Sender: TObject);
  46. begin
  47.    PrintGridReport1.Orientation := Landscape;
  48.  
  49.   { Do not total VendorNo fields, but do all the rest  }
  50.   PrintGridReport1.SetPrintTotal('VendorNo', False);
  51.   PrintGridReport1.SetPrintTotal('PartNo', False);
  52.  
  53.     PrintGridReport1.Execute;
  54.  
  55. end;
  56.  
  57. procedure Tdem04form.PrintGridReport1PrintFooter(Sender: TObject);
  58. begin
  59.      PrintGridReport1.FrameStyleBottom := frDoubleThin;
  60.      PrintGridReport1.FrameStyleTop := frSingleThin;
  61. end;
  62.  
  63. end.
  64.